<template>
	<view class="content">
		<u-cell-group>
			<u-cell  title="客户名称" :value="detail.nickname"></u-cell>
			<u-cell  title="性别" v-if="detail.gender == 0" value="保密"></u-cell>
			<u-cell  title="性别" v-else-if="detail.gender == 1" value="男"></u-cell>
			<u-cell  title="性别" v-else value="女"></u-cell>
			<u-cell  title="客户来源" :value="detail.source.name"></u-cell>
			<u-cell  title="成交状态" :value="detail.deal_text"></u-cell>
			<u-cell  title="创建时间" :value="detail.createtime"></u-cell>
		</u-cell-group>
		<!-- 地区-->
		<!-- <view  @click="RegionShow = true">
			<pick-regions :defaultRegion="detail.region" @getRegion="handleGetRegion">
				<u--input v-model="detail.region_text" disabled disabledColor="#ffffff" placeholder="请选择地区"
					border="none">
				</u--input>
				<u-icon slot="right" name="arrow-right">
				</u-icon>
			</pick-regions>
		</view> -->
	</view>
</template>

<script>
	//引入第三方的地区插件
	import pickRegions from '@/components/pick-regions/pick-regions.vue'
	export default {
		components:{
			pickRegions,
		},
		data(){
			return {
				id: 0,
				detail:{
					source:{
						name: ''
					}
				},
				RegionShow: false
			}
		},
		onLoad(options){
			this.id = options.id ? options.id : 0
			this.getbusinessinfo()
		},
		methods:{
			async getbusinessinfo(){
				let result = await this.$u.api.business.highseaInfo({id: this.id})
				if(result.code == 1){
					this.detail = result.data
				}
			},
			handleGetRegion(val){
				console.log(val)
				console.log(this.detail)
			},
		}
	}
</script>

<style>
	.content{
		/* width: 90%; */
		height: 100vh;
		/* margin: 0 auto; */
	}
</style>
